
<script src="./js/deptleaderaudit.js"></script>
     <!--Start Breadcrumb-->
<div class="row">
	<div id="breadcrumb" class="col-xs-12">
	<a href="#" class="show-sidebar">
						  <i class="fa fa-bars"></i>
						</a>
		<ol class="breadcrumb pull-left">
			<li><a href="index">首页</a></li>
			<li><a href="#">我的待办任务</a></li>
			<li><a href="#">请假待办</a></li>
			<li><a href="#">部门领导审批</a></li>
		</ol>
	</div>
</div>       
            <div class="container-fluid">
                       <div class="row">
                    <div class="col-lg-12">
                    <div class="box ui-draggable ui-droppable">
				<div class="box-header">
					<div class="box-name">
						<i class="fa fa-coffee"></i> <span>部门领导审批</span>
					</div>
					<div class="box-icons">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a> <a class="expand-link"> <i class="fa fa-expand"></i>
						</a> <a class="close-link"> <i class="fa fa-times"></i>
						</a>
					</div>
					<div class="no-move"></div>
				</div>
				<div class="box-content">
                                <table id="grid-data" class="table table-condensed table-hover table-striped">
							        <thead>
							            <tr>
							                <th data-column-id="user_id" data-identifier="true" data-type="numeric">申请人</th>
							                <th data-column-id="leave_type">类型</th>
							                <th data-column-id="start_time">请假开始时间</th>
							                <th data-column-id="end_time">请假结束时间</th>
							                <th data-column-id="reason">请假原因</th>
							                <th data-column-id="taskname">任务名称</th>
							                <th data-column-id="apply_time">申请时间</th>
							                <th data-formatter="commands">操作</th>
							            </tr>
							        </thead>
							    </table>
                            </div>
                            </div>
                        </div>
                    </div>
	<div class="row">
		<div class="col-lg-12">
			<div class="box ui-draggable ui-droppable" id="dept">
				<div class="box-header">
					<div class="box-name">
						<i class="fa fa-search"></i> <span>部门领导审批</span>
					</div>
					<div class="box-icons">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a> <a class="expand-link"> <i class="fa fa-expand"></i>
						</a> <a class="close-link"> <i class="fa fa-times"></i>
						</a>
					</div>
					<div class="no-move"></div>
				</div>
				<div class="box-content">
						<form role="form" action="" method="post">
                                	 <div class="form-group">
						                <label>申请人</label>
						                <input class="form-control" id="userid" readonly="readonly"/>
						              </div>
						             <div class="form-group">
						                <label>申请时间</label>
						                <input class="form-control" id="applytime" readonly="readonly"/>
						             </div>
                                	<div class="form-group">
						                <label>开始时间</label>
						                <input class="form-control" id="startime" readonly="readonly"/>
						             </div>
						             <div class="form-group">
						                <label>结束时间</label>
						                <input class="form-control" id="endtime" readonly="readonly"/>
						             </div>
						             <div class="form-group">
						                <label>请假类型</label>
						                <input class="form-control" id="type" readonly="readonly"/>
						             </div>
						             <div class="form-group">
						                <label>请假原因</label>
						                 <input class="form-control" id="reason" readonly="readonly"/>
						             </div>    
						             <div class="form-group">
						                <label>审批意见</label>
						                <div class="controls">
											<select name="deptleaderapprove">
												<option value="true">同意</option>
												<option value="false">拒绝</option>
											</select>
										</div>
						             </div> 
						             <div class="form-group">
										<label>请选择hr进行审批</label> 
										<select id="hr" name="hr" class="form-control">
										</select>
									</div>
						              <button id="btn" type="button" class="btn btn-default">完成</button>
                                </form>
				</div>
			</div>

		</div>
	</div>

</div>
            
<script type="text/javascript">
$(document).ready(function(){
	$.get("/listUsers",function(data){
		for (i=0;i<data.length;i++) {
			$("#hr").append("<option value='"+ data[i].username +"'>" + data[i].username + "</option>");
		}
	});
	
	$("#btn").click(function(){
		$.post("task/deptcomplete/"+$("form").data("taskid"),$("form").serialize(),function(a){
			alert("处理成功");
			LoadAjaxContent("deptleaderaudit");
		});
	});
});

</script>
            
            
    